package com.apartment.own.domain.enums;


import com.baomidou.mybatisplus.annotation.IEnum;

import javax.persistence.criteria.CriteriaBuilder;
import java.io.Serializable;

/**
 * des. 租金付款方式 这个是加收费用
 *
 * @author :  RazaJin
 * @createDate :  2020/9/1 0001 下午 3:05
 */
public enum ExtraEnum implements IEnum {
    /**
     *
     */
    TYPE1(1, "一次付清", 1),

    TYPES(2, "随租金付", 0);
    /**
     *
     */
    //TYPE11(3, "一月一次", 0),
    /**
     *
     */
    //TYPE21(4, "两月一次", 0),
    /**
     *
     */
    //TYPE31(5, "三月一次", 0),
    /**
     *
     */
    //TYPE41(6, "四月一次", 0),
    /**
     *
     */
    //TYPE61(7, "半年一次", 0),
    /**
     *
     */
    //TYPE121(8, "一年一次", 0);


    private Integer id;
    private String name;
    private Integer select;

    public Integer getSelect() {
        return select;
    }

    public void setSelect(Integer select) {
        this.select = select;
    }

    ExtraEnum(Integer id, String name, Integer select) {
        this.id = id;
        this.name = name;
        this.select = select;
    }

    public static ExtraEnum getEnum(int id) {
        for (ExtraEnum enums : ExtraEnum.values()) {
            if (enums.getValue().equals(id)) {
                return enums;
            }
        }
        return null;
    }

    @Override
    public Serializable getValue() {
        return this.id;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}

